﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SWDataDB.Models;
using SWDataDB.BLL;
using SWDataDB.DAL;
using System.Data;

public partial class Admin_add_addBB : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        
    }

    protected void submit_Click(object sender, EventArgs e)
    {
        BB_INFO_TBL bbInfo = new BB_INFO_TBL();
        BBInfo kc_in = new BBInfo();

        bbInfo.O_ZL_FILE_ID = Request.Form["ZL_FILE_ID"];
        bbInfo.O_BB_NAME = Request.Form["BB_NAME"];
        bbInfo.O_BB_CODE = Request.Form["BB_CODE"];


        bbInfo.O_PM_PATH_NAME = Request.Form["PM_PATH_NAME"];
        bbInfo.O_PM_PATH_NUM = Request.Form["PM_PATH_NUM"];
        bbInfo.O_GEO_ATT_NUM = Request.Form["GEO_ATT_NUM"];
        bbInfo.O_CY_POS = Request.Form["CY_POS"];





        bbInfo.O_QY_METHOD = Request.Form["QY_METHOD"];
        bbInfo.O_CY_LEVEL = Request.Form["CY_LEVEL"];
        bbInfo.O_CJ_PEOPLE = Request.Form["CJ_PEOPLE"];

        bbInfo.O_CJ_DATE = Request.Form["CJ_DATE"];

        bbInfo.O_BB_LAT = int.Parse((Request.Form["BB_LAT_D"] + Request.Form["BB_LAT_F"] + Request.Form["BB_LAT_M"]));
        bbInfo.O_BB_LON = int.Parse((Request.Form["BB_LON_D"] + Request.Form["BB_LON_F"] + Request.Form["BB_LON_M"]));

        bbInfo.O_BB_STYLE = Request.Form["BB_STYLE"];

        bbInfo.O_STYLE_CODE = Request.Form["STYLE_CODE"];
        bbInfo.O_BP_ID = Request.Form["BP_ID"];
        bbInfo.O_OUT_NAME = Request.Form["OUT_NAME"];
        bbInfo.O_INNAR_NAME = Request.Form["INNAR_NAME"];

        //pm_info.O_IMAGE = Request.Form["IMAGE"];

        bbInfo.O_REMARK = this.REMARK.InnerText;




        if (kc_in.AddbbInfo(bbInfo) == 1)
        {
            Response.Write("<script language=javascript>alert('添加成功！');location='../Manage/BBManage.aspx'</script>");
            //Response.Redirect("ZLManage.aspx");
        }
        else
        {
            Response.Write("<script language=javascript>alert('添加失败！');location='../Manage/BBManage.aspx'</script>");
        }
    }
}